package com.vegetable.modules.entity.stock;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * <p>
 * 库存预警记录表
 * </p>
 *
 * @author wangruijie
 * @since 2024-09-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="StockAlertRecord对象", description="库存预警记录表")
public class StockAlertRecord extends BaseEntity {

    @ApiModelProperty(value = "预警设置ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long alertId;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品编码")
    private String commonCode;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "当前库存数量")
    private Integer currentQuantity;

    @ApiModelProperty(value = "预警阈值")
    private Integer alertQuantity;

    @ApiModelProperty(value = "预警级别：1低级2中级3高级")
    private Integer alertLevel;

    @ApiModelProperty(value = "预警状态：0未处理1已处理2已忽略")
    private Integer alertStatus;

    @ApiModelProperty(value = "预警时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date alertTime;

    @ApiModelProperty(value = "处理时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date handleTime;

    @ApiModelProperty(value = "处理人ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long handleUserId;

    @ApiModelProperty(value = "处理备注")
    private String handleRemark;

    @ApiModelProperty(value = "台账标识 0寿光 1河北")
    private Integer regionId;
}